package com.ycu.jk16.mall.domain;

import java.math.BigDecimal;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

/**
 * 
 * @ClassName Product
 * @Description TODO(数据库Product_inf表的Java类)
 * @author 倪宗龙
 * @date 2018年12月8日 下午10:20:09
 * @version V1.0
 */
public class Product {
	private Integer id;
	private ParentCategory parentCategory;
	private Category category;
	private String name;
	private String subtitle;
	private String imageHost;
	private String mainImage;
	private String detail;
	private BigDecimal price;
	private Integer stock;
	private Integer status;
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date createTime;
	@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
	private Date updateTime;

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public ParentCategory getParentCategory() {
		return parentCategory;
	}

	public void setParentCategory(ParentCategory parentCategory) {
		this.parentCategory = parentCategory;
	}

	public Category getCategory() {
		return category;
	}

	public void setCategory(Category category) {
		this.category = category;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getSubtitle() {
		return subtitle;
	}

	public void setSubtitle(String subtitle) {
		this.subtitle = subtitle;
	}

	public String getMainImage() {
		return mainImage;
	}

	public void setMainImage(String mainImage) {
		this.mainImage = mainImage;
	}

	public String getDetail() {
		return detail;
	}

	public void setDetail(String detail) {
		this.detail = detail;
	}

	public BigDecimal getPrice() {
		return price;
	}

	public void setPrice(BigDecimal price) {
		this.price = price;
	}

	public Integer getStock() {
		return stock;
	}

	public void setStock(Integer stock) {
		this.stock = stock;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}

	public Product() {
		super();
	}
	
	public Product(Integer id) {
		super();
		this.id = id;
	}

	public String getImageHost() {
		return imageHost;
	}

	public void setImageHost(String imageHost) {
		this.imageHost = imageHost;
	}

	@Override
	public String toString() {
		return "Product [id=" + id + ", parentCategory=" + parentCategory + ", category=" + category + ", name=" + name
				+ ", subtitle=" + subtitle + ", imageHost=" + imageHost +", mainImage=" + mainImage + ", detail=" + detail + ", price=" + price
				+ ", stock=" + stock + ", status=" + status + ", createTime=" + createTime + ", updateTime="
				+ updateTime + "]";
	}

}
